Skip to content

fix: explain C99 assembly-catalog part numbers in the not-found error (#390) - #415

Open
DPS0340 wants to merge 1 commit into
tscircuit:mainfrom
DPS0340:fix/c99-assembly-part-error-390
Open

fix: explain C99 assembly-catalog part numbers in the not-found error (#390)#415
DPS0340 wants to merge 1 commit into
tscircuit:mainfrom
DPS0340:fix/c99-assembly-part-error-390

Conversation

@DPS0340

@DPS0340 DPS0340 commented Jul 24, 2026

Copy link
Copy Markdown

Progress on #390 — makes the failure explainable instead of a dead end.

Investigation

C9900033429 (the reported part) is a JLCPCB assembly-catalog part number. Verified against both EasyEDA API paths on 2026-07-24 (details in my issue comment):

  • search API (/api/components/search, what fetchEasyEDAComponent uses): 0 results in every list (lcsc/easyeda/SMT/…)
  • products API (/api/products/C9900033429/components): {success:false, code:404}

So the converter genuinely has nothing to fetch — the failure is correct, but the bare "Component not found" gives the user no way to understand or work around it.

Change

  • C99\d{6,}-prefixed parts get a specific error: identifies the number as a JLCPCB assembly-catalog entry that frequently has no EasyEDA symbol/footprint, and suggests searching the underlying manufacturer part number instead.
  • The generic not-found error now includes the part number that failed.

Verification

  • Two new tests using the existing injectable fetch seam (no network): C99 part → assembly-catalog message; other part → generic message with part number
  • Full tests/fetch-tests suite: 9 pass, 0 fail
  • bunx tsc --noEmit / biome check — clean

Progress on tscircuit#390.

C9900033429 (the reported part) is a JLCPCB assembly-catalog number:
both the EasyEDA search API and the products API return nothing for it
(verified 2026-07-24 — every search list empty, products API 404), so
the converter genuinely has nothing to fetch.

The bare 'Component not found' error now identifies C99-prefixed
assembly parts and suggests searching the underlying manufacturer part
number, and the generic error includes the part number that failed.
@DPS0340

DPS0340 commented Jul 25, 2026

Copy link
Copy Markdown
Author

@Abse2001 same for this one if you have a minute — it's a one-message error-text change.

Fixes #390. When a part number resolves to an assembly-catalog-only entry (the C99... range), the lookup fails with a generic not-found error, which reads like the part doesn't exist. The PR makes the message say what actually happened so the user knows the part is real but not fetchable this way.

CI green, MERGEABLE / CLEAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant